import request from '@/utils/request'
import {pramsToQuery} from '@/utils/index'

// 获取文档列表
export function getFileList(data) {
  return request({
    url: `/document/pagingFile?${pramsToQuery(data)}`,
    method: 'get',
    data
  })
}
// 查看编辑历史
export function getEditLog(data) {
  return request({
    url: `/document/${data.id}/history?${pramsToQuery(data)}`,
    method: 'get',
    data
  })
}
// 文档封禁
export function clsFile(data) {
  return request({
    url: `/document/${data.id}/${data.enable}`,
    method: 'put',
    data
  })
}
